#include <iostream>
#include <vector>
using namespace std;
int pash(int n, int m)
{
    if (n == 1 || m == 1)
        return 1;
    else
        return pash(n - 1, m) + pash(n, m - 1);
}
int main() 
{
    int n = 0, m = 0;
    cin >> n >> m;
    n += 1;
    m += 1;
    vector<vector<int>> arr(n, vector<int>(m, 1));
    for (int i = 1; i < n; ++i)
    {
        for (int j = 1; j < m; ++j)
        {
            arr[i][j] = arr[i - 1][j] + arr[i][j - 1];
        }
    }
    cout << arr[n - 1][m - 1];
    // cout << pash(n + 1, m + 1); // 法二...这题目描述 +1？
    return 0;
}